//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#ifndef _PearsonCorrelation_h__
#define	_PearsonCorrelation_h__
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include "libraries.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
class PearsonCorrelation {
  
  private:
    
    TListE <double>*   x;
    TListE <double>*   y;
    
    double             xMean;
    double             yMean;
    
    double             coefficient;
    
  public:
    
    PearsonCorrelation();
    PearsonCorrelation(const PearsonCorrelation&);
    PearsonCorrelation(const PearsonCorrelation*);
    
    ~PearsonCorrelation();
    
    void               X(TListE <double>*);
    void               Y(TListE <double>*);
    
    void               XMean(double);
    void               YMean(double);
    
    void               Coefficient(double);
    
    TListE <double>*   X(void);
    TListE <double>*   Y(void);
    
    double             XMean(void);
    double             YMean(void);
    
    double             Coefficient(void);

    bool               ComputeXMean(void);
    bool               ComputeYMean(void);
    
    bool               ComputeMeanData(TListE <double>*, double&);
    
    bool               ComputeCoefficient(void);
    
};
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#endif
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//

